using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Test
{
    public partial class TForm : Form
    {
        ContainerControl containerRadio = null;
        public TForm()
        {
            InitializeComponent();
            listBox1.Items.Add("a");

        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox checkBox = (CheckBox)sender;
            MessageBox.Show(checkBox.Name + " new value is " + checkBox.Checked.ToString());
        }

        private void TForm_MouseClick(object sender, MouseEventArgs e)
        {
            Panel tpanel = (Panel)sender;
            System.Drawing.Size size = new System.Drawing.Size(400,200);
            
            Point position = new Point(202,3);
            Bitmap image = new Bitmap(@"D:\TonD\My Documents\My Pictures\genesys\Options-View.bmp");
            PictureBox picture = new PictureBox();
            this.Controls.Add(picture);tpanel.Size = size;
            picture.Image = (Image)image;
            picture.Location = position;
            size.Height = 10;
            size.Width = 10;
            picture.Size = size;
            picture.BorderStyle = (BorderStyle)1;
            picture.BackColor = System.Drawing.Color.Red;
            pictureBox1.BackColor = System.Drawing.Color.Red;
            picture.Visible = true;

        }
    }
}